package sk.mucha.tracking;

import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable;
import org.apache.wicket.extensions.markup.html.repeater.data.table.HeadersToolbar;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.NavigationToolbar;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.filter.FilterForm;
import org.apache.wicket.extensions.markup.html.repeater.data.table.filter.FilterToolbar;
import org.apache.wicket.model.Model;
import org.apache.wicket.protocol.https.RequireHttps;

import sk.mucha.tracking.classes.SecurePage;
import sk.mucha.tracking.classes.UserProvider;

//@RequireHttps
@SecurePage
public class SomethingPage extends PageTemplate {

	UserProvider dataProvider = new UserProvider();
	public SomethingPage() {
		
		IColumn[] columns = new IColumn[4];
		columns[0] = new PropertyColumn(new Model<String>("User ID"), "userID", "userID");
		 columns[1] = new PropertyColumn(new Model<String>("Name"), "userName", "userName");
		 columns[2] = new PropertyColumn(new Model<String>("Surname"), "userSurName", "userSurName");
		 columns[3] = new PropertyColumn(new Model<String>("Email"), "userEmail", "userEmail");
		 
		 DataTable table = new DataTable("datatable", columns, dataProvider, 10);
		 
		 table.addBottomToolbar(new NavigationToolbar(table));
		 table.addTopToolbar(new HeadersToolbar(table, dataProvider));
		 add(table);
	}
	
	@Override
	public String getPageTitle() {
		return "Something";
	}

	
}
